<template>
  <div class="activity-details">
    <!-- 饮食介绍 -->
    <img class="info-img" :src="info.img1">
    <div class="info-p">
      <p class="title">{{info.title}}</p>
      <p class="time"><span>{{info.create_time}}</span> <span class="read">{{info.looked_num}}阅</span></p>  
      <div class="edit-article">
        <p v-html="info.content"></p>
      </div>
    </div>
  </div>
</template>

<script>

import { getNewShow } from '@/api/api'

export default {
  components: {
  },
  data () {
    return {
      info: {},
    }
  },
  created () {
    this.newsId = this.$route.query.newsId
    this.get_new_show()
  },
  methods: {    
    router (path) {
      this.$router.push(path)
    },
    get_new_show() {
      getNewShow(this.newsId).then((res) => {
        console.log(res)
        this.info = res.data.info
      }).catch((err) => {
        console.dir(err)
      })
    }
  }
}
</script>
<style lang="stylus" scoped>
  .activity-details
    background-color #f2f2f2
    min-width 100vw
    min-height 100vh
    .info-p
      background-color #fff
      margin-bottom 1rem    
      padding-top 1.5rem
      .title
        line-height 2.4rem
        font-size 1.7rem
        color #333
        font-weight bold
        padding 0 1.5rem
      .time
        color #999
        font-size 1.3rem
        margin-top 1rem 
        padding 0 1.5rem
        display flex
        .read
          flex 1
          text-align right
      .share
        display flex
        border-top 1px solid #e5e5e5
        border-bottom 1px solid #e5e5e5
        padding 1rem 1.5rem
        margin-top 2rem
        span
          flex 1
          display block
          font-size 1.3rem
          color #333
          img
            width 2.4rem
            display inline-block
            vertical-align middle
            margin-right 1rem
      .edit-article
        padding 0 1.5rem
        padding-top 3rem
        padding-bottom 2rem
        p
          margin-bottom 1.5rem
          font-size 1.3rem
          color #666
          line-height 2.4rem
</style>